package com.blink.optimize.apis.bool;

import org.junit.jupiter.api.Test;

/**
 * <ClassName>TestBool</ClassName>
 * <Description></Description>
 *
 * @Author liuxianzhao
 * @Date 2018年01月06日 13:36
 */
public class TestBool {
    @Test
    public void testBitOperate() {
        long start = System.currentTimeMillis();
        boolean a = false;
        boolean b = true;
        int c = 0;
        for (int i = 0; i < 100000000; i++) {
            if (a & b & "Test_123".contains("123")) {
                c = 1;
            }
        }
        System.out.println(System.currentTimeMillis() - start);
    }

    @Test
    public void testBoolOperate() {
        long start = System.currentTimeMillis();
        boolean a = false;
        boolean b = true;
        int c = 0;
        for (int i = 0; i < 100000000; i++) {
            if (a && b && "Test_123".contains("123")) {
                c = 1;
            }
        }
        System.out.println(System.currentTimeMillis() - start);
    }
}
